<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!-- VERSION DE HTML5 -->
<!DOCTYPE html>
    
<html lang="es">
	<!-- CONFIGURACION DE LA PAGINA WEB ACTUAL -->
	<head>
		<!-- GENERAL's -->
		<title>Sistema Entretenimiento</title>

		<!-- META's -->
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">

		<!-- LINK's -->
		<link type="text/css" rel="stylesheet" href="resources/css/bootstrap.min.css">
		<link type="text/css" rel="stylesheet" href="resources/css/styles-general.css">
	</head>

	<!-- CONTENIDO DE LA PAGINA WEB ACTUAL -->
	<body class="container">
		
		<!-- AGREGA LOS MODAL's COMUNES -->
		<jsp:include page="template/modals.jsp" />

		<!-- ENCABEZADO -->
		<jsp:include page="template/header.jsp"/>

		<!-- MENU DE NAVEGACION -->
		<jsp:include page="template/navigation.jsp"/>
		
		<!-- CUERPO DE PAGINA -->
		<section class="col-xs-12">
			<form role="form" method="post" action="CotizacionGuardar_Serlvet">
				<input type="hidden" name="codigo" value="${codigo }">
				<fieldset>
					<legend>Visualizar Cotizacion
						<span class="error">
							<c:if test="${not empty error }">
								<c:out value="${error }"></c:out>
							</c:if>
						</span>
						<span class="success">
							<c:if test="${not empty success }">
								<c:out value="${success }"></c:out>
							</c:if>
						</span>
					</legend>
					<div class="col-xs-12">
						<div class="form-group col-xs-4">
			  				<label for="fecha">Fecha :&nbsp;${fecha }</label>			  				
						</div>
						<div class="form-group col-xs-4">
			  				<label for="club">Club :&nbsp;${club }</label>
						</div>
						<div class="form-group col-xs-4">
			  				<label for="nroParticipantes">Nro. Participantes :&nbsp;${nroParticipantes }</label>
						</div>
					</div>
				</fieldset>
				
				<table class="table table-condensed">
					<thead>
						<tr>
							<th>N°</th>
							<th>Servicio / Juego</th>
							<th># Personas</th>
							<th>Costo</th>
							<th>Monto</th>							
						</tr>
					</thead>
					<tbody>
						<c:if test="${not empty listDetalleCotizacion }">
							<c:forEach items="${listDetalleCotizacion }" var="item" varStatus="index">
								<tr class="vcenter">
									<td class="col-md-1">${index.count }</td>
									<td class="col-md-4">${item.nombre }</td>
									<td class="col-md-2">${item.cantPersonas }</td>
									<td class="col-md-2">${item.costo }</td>
									<td class="col-md-2">${item.monto }</td>
								</tr>
							</c:forEach>
						</c:if>
						<c:if test="${empty listDetalleCotizacion }">
							<tr>
								<td colspan="5">
									No se ha registrado ningun servicio
								</td>
							</tr>
						</c:if>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="5" class="text-right">
								Monto Total :&nbsp;${montoTotal }
							</td>
						</tr>
					</tfoot>
				</table>
				<button value="AprobarCotizacion" name="aprobar" type="submit" class="btn btn-primary">Aprobar</button>
				<button value="RechazarCotizacion" name="rechazar" type="submit" class="btn btn-danger">Rechazar</button>
				<a href="list_cotizacion.jsp" class="btn btn-info">
					Regresar
				</a>				
			</form>
		</section>

		<!-- SCRIPT's -->
		<script type="text/javascript" src="resources/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="resources/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="resources/js/scripts-general.js"></script>
	</body>
</html>